This file serves as an explanatory document of the data contained in the V883 Ori HDO/H2O study archive.


To run through all the analysis steps, make sure you have a Python 3.6 or later environment, a CASA 6.2.1 or later
installation (tested up to CASA 6.5.2), astropy, bettermoments, and spectralcube packages installed. Making the
figures requires aplpy and the cmocean package (uses cmo.ice colormap).

Explanations per file:

analysis_steps.sh                         # script to run all the programs in the correct order

extract_spectra.py                        # extract spectra from data cubes
extract_template_spectrum.py              # extract and create a template spectrum from the methanol data
extract_template_H218O.py                 # extract and create a template spectrum from the LIME model
plotTemplates.py                          # plot template spectra with each other
write_text_spectral_templates.py          # write out the spectral templates as text files

make_casa_images_from_fits.py             # runs inside CASA; import the provided FITS images into CASA image format
moments-water_5_to_7_kms.py               # runs inside CASA; make moment map for HDO/H218O moment maps between 5.05 to 7.05 km/s

extract_flux_moment0.py                   # get HDO/H218O line fluxes from 5 to 7 km/s range

keplerian_mask_steps_same_params.py       # runs inside CASA; creates Keplerian masks, requires ~ at least 64 GB of RAM 

keplerian-masks.tar.gz                    # premade Keplerian masks

make_moment_maps.py                       # make moment 0 maps using Keplerian masks and bettermoments
moments-CH3OH.py                          # runs inside CASA; make simple moment map for CH3OH data

extract_line_flux_keplerian_mask.py       # extract flux of water lines from Keplerian masks
plot_channel_maps.py                      # plot channel maps of HDO and H218O
make_radial_profiles.py                   # make radial profiles using Keplerian masks
make_nice_radial_profiles.py              # make a nice plot of radial intensity profiles


regrid_LSRK_stack_CH3OH.py                # runs inside CASA; makes a stacked line cube of the isolated methanol lines, requires MS files

stack_cubes.py                            # remove velocity profile from line cubes 'line stacking'
stack_lime_template.py                    # stack the LIME template
extract_template_spectrum_stacked.py      # extract template spectrum from the CH3OH stacked data cube
extract_template_spectrum_lime_stacked.py # extract the lime template spectrum from the stacked LIME model
write_text_spectral_templates_stacked.py  # write out the stacked spectral templates as text files
plotTemplates_stacked.py                  # plot stacked template spectra with each other
plot_stacked_spectra.py                   # plot stacked spectra with line IDs for HDO and H218O
CH3OH_enclosing_region.reg                # used by stack_cubes.py to select region to apply line stacking


make_HDO_Trot_profile_final.py H218O      # make HDO/H2O calculations from disk-averaged spectrum
                                          # and makes radial profile calculations
                                          # command line arguments enable more options for calculating
                                          # the HDO/H2O ratio from different measurements
                                          # will run after just the first three steps to provide disk-averaged measurements
                                          # but will not create radial profiles

fit_HDO_H218O_template_mcmc_final.py      # used by make_HDO_Trot_profile_final.py to fit HDO and H218O lines with spectral template


disk-images-1panel-double-mom0.py         # aplpy script to plot images (1 overlay)
disk-images-1panel-single-mom0.py         # aplpy script to plot images (2 overlays)



make_dh_figure.py                         # creates D/H ratio figure including protostars, V883 Ori, comets, etc.
ratios.csv                                # stores D/H ratios for use by make_dh_figure.py

H218O-i38.3-203GHz-edited-header.fits                           # Model Keplerian profile used as a spectral template; 
                                                                # header edited to work with line stacking               
H218O-i38.3-203GHz.fits                                         # Model Keplerian profile used as a spectral template
V883_Ori_SB_C17O-224.711GHz_robust_2.0.image.fits               # C17O data cube 
V883_Ori_SB_CH3OH-241.846GHz-fullcube_robust_2.0.image.fits     # CH3OH data cube
V883_Ori_SB_CH3OH_stacked_robust_0.5.image.fits                 # stacked CH3OH data cube
V883_Ori_SB_continuum_203GHz_robust_0.5.image.tt0.fits          # 203 GHz continuum image
V883_Ori_SB_continuum_235GHz_robust_0.5.image.tt0.fits          # 235 GHz continuum image
V883_Ori_SB_H218O-203.GHz-0.4kms_robust_2.0.image.fits          # H218O data cube
V883_Ori_SB_H2CO-225.694GHz-fullcube_robust_2.0.image.fits      # H2CO data cube
V883_Ori_SB_HDO-225.535GHz_robust_2.0.image.fits                # HDO 225 GHz data cube
V883_Ori_SB_HDO-241.558GHz_robust_2.0.image.fits                # HDO 241 GHz data cube

H218O_continuum_SB.py                     # reduction script for continuum data and self-calibration
H218O_spectral_line_SB.py                 # reduction script for spectral line data, run after continuum script

HDO_continuum_SB.py                       # reduction script for continuum data and self-calibration
HDO_spectral_line_SB.py                   # reduction script for spectral line data, run after continuum script



